<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        /*第一个li red*/
        /*ul > li:first-child {*/
        /*    color: red;*/
        /*}*/

        ul > li:nth-child(1) {
            color: red;
        }

        ul > li:first-of-type {
            color: red;
        }
    </style>
</head>
<body>
<ul>
    <span></span>
    <li>1</li>
    <li>2</li>
    <li>3</li>
    <li>4</li>
    <li>5</li>
</ul>

</body>
</html>